package com.itheima.tliasmanager.mapper;

import com.itheima.tliasmanager.pojo.Dto.ClazzCount;
import com.itheima.tliasmanager.pojo.Dto.GenderCount;
import com.itheima.tliasmanager.pojo.Dto.QueryParam;
import com.itheima.tliasmanager.pojo.domain.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper {


    List<Student> pageList(QueryParam queryParam) ;

    void deleteByIds(List<Integer> ids);

    void inster(Student student);

    Student getById(Integer id);

    void updateStudent(Student student);

    void updateStudentViolation(Integer id, Short score);

    List<GenderCount> countByDegree();

    List<ClazzCount> countByClazz();

    @Select("select * from student where clazz_id = #{id}")
    List<Student> listByClazzId(Integer id);
}
